import request from "../../utils/request";

const BASE_URL = "maimao_info/info/collect";
export default {

    /**
     * 添加收藏
     * @param targetId 商品id或店铺id
     * @param type 1 商品 0店铺
     */
    add(collectList) {
        return request({
            url: `${BASE_URL}/add`,
            method: 'post',
            data: collectList
        })
    },
    /**
     * 关注的商品
     */
    collectGoodsList() {
        return request({
            url: `${BASE_URL}/follow-goods`,
            method: 'get'
        })
    },
    /**
     * 移除收藏
     * @returns {AxiosPromise}
     */
    remove(id) {
        return request({
            url: `${BASE_URL}/remove`,
            method: 'delete',
            data:{
                id
            }
        })
    }


}

